/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.noah.rowmapper;

import com.noah.model.RoleModel;
import java.sql.ResultSet;
import java.sql.SQLException;
import org.springframework.jdbc.core.RowMapper;

/**
 *
 * @author ngoc.phan
 */
public class RoleRowMapper implements RowMapper{

    @Override
    public Object mapRow(ResultSet rs, int i) throws SQLException {
        RoleModel rolemodel = new RoleModel();
        rolemodel.setRoleId(rs.getInt("roleId"));
        rolemodel.setRoleName(rs.getString("roleName"));
        return rolemodel;
    }
    
    
}
